#if !defined(AFX_EVENTLOG_H__00C835EA_70BD_4DA9_97D7_90315F586817__INCLUDED_)
#define AFX_EVENTLOG_H__00C835EA_70BD_4DA9_97D7_90315F586817__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// EventLog.h : header file
//
#define	EVENTNUM	2000

/////////////////////////////////////////////////////////////////////////////
// CEventLog dialog
class CEventLogInfo
{
public:
	CString	strEventTime;
	CString	strEventInfo;
	CString strUserName;
};
class CEventLog : public CDialog
{
// Construction
public:
	void SetEventLog();
	void SetAlarmLog();
	void SaveEventLogToDB(CString strEventTime,CString strEventInfo,CString strUsername);
	CEventLog(CWnd* pParent = NULL);   // standard constructor
	BOOL m_bSave;
	UINT m_nTimer;
	void F_SaveEventFile(CString csFileName);
	void F_InitList();
	void AddEvent(CString csEvent);
	CBitmap m_BitmapBk;
	int		m_nCurLogType;
// Dialog Data
	//{{AFX_DATA(CEventLog)
	enum { IDD = IDD_EVENTLOG };
	CListCtrl	m_listAlarmLog;
	CTabCtrl	m_TabLogType;
	CListCtrl	m_list;
	CListCtrl	*m_plist;
	CTime	m_ctStartDate;
	CTime	m_ctStartTime;
	CTime	m_ctEndDate;
	CTime	m_ctEndTime;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CEventLog)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	int m_nAlmListIndexDevName;
	int m_nAlmListIndexStartTime;
	int m_nAlmListIndexEndTime;
	// Generated message map functions
	//{{AFX_MSG(CEventLog)
	afx_msg void OnButtonsave();
	virtual BOOL OnInitDialog();
	afx_msg void OnExit();
	afx_msg void OnCancel();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnBtnQuery();
	afx_msg void OnBtnShowLog();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnSelChangeTabLogType(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnBtnPlayer();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_EVENTLOG_H__00C835EA_70BD_4DA9_97D7_90315F586817__INCLUDED_)
